package com.small.nacos.sys.utils;

import static com.small.nacos.sys.env.Constants.NACOS_SERVER_IP;

/**
 * @Author zhoujin
 * @Date 2022/11/5 10:33
 */
public class InetUtils {

    private static String selfIP;

    static {
        selfIP = System.getProperty(NACOS_SERVER_IP);
        if (selfIP == null || selfIP.length() == 0 ){
            selfIP = "127.0.0.1";
        }
    }

    public static String getSelfIP() {
        return selfIP;
    }
}
